<?php

require 'Response.php';
require 'DB.php';

$id=$_REQUEST['id'];

$pdo=DB::getInstance()->connect();


$stmt1 = $pdo->query("SELECT SUM(pay) AS total2 FROM `adds` where type='衣服'");
//$stmt1 = $pdo->query("SELECT type  FROM `adds` ");
//$stmt = $pdo->query(); //返回一个PDOStatement对象

$data= $stmt1->fetchAll();//获得所有
//var_dump($data);
Response::json('200','成功',$data);
